/**
 * 常量
 * Author sirius
 */

// 基础配置
export const config = {
  name: '',
  prefix: '',
  footerText: <a
    style={{color:'#000'}}
    target="_blank" 
    rel="noopener noreferrer"
    href="http://www.beian.miit.gov.cn">蜀ICP备19004467号</a>,
  logo: require('../assets/logo.png'),
  openPages: ['/login']
};

// 时间格式
export const ymdhms = 'YYYY-MM-DD HH:mm:ss';
export const ymd = 'YYYY-MM-DD';
// 正则表达式
export const reg = {
  email: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
  mobile: /^1[0-9]\d{9}$/
};
// 分页配置
export const pageConfig = {
  showSizeChanger: false,
  showQuickJumper: true,
  showTotal: (total) => `共${total} 条记录`,
  current: 1,
  total: 0,
  pageSize: 10
};
// 简约分页配置
export const smallPageConfig = {
  showSizeChanger: false,
  showTotal: (total) => `共${total} 条记录`,
  current: 1,
  total: 0,
  pageSize: 7
};

export const ONSTATUS = {
  0: '不在线',
  1: '在线'
};
export const FILEDSTATUS = {
  0: '删除',
  1: '开启'
};

// 设备状态
export const ONLINESTATUS = {
  0: '删除',
  1: '开启',
  2: '禁用'
};
export const STSTUSKEY = {
  DELETE: 0,
  ACTIVE: 1,
  FORBIDDEN: 2
};
// 设备类型
export const EQUIPMENT = {
  1: '类型1',
  2: '类型2'
};
// 权限类型 
export const AUTHTYPE = {
  1: '菜单',
  2: '按钮'
};
// 消息类型
export const MESSAGETYPE = {
  1: { name: '用户', key: 'user' },
  2: { name: '公司', key: 'company' },
  3: { name: '全站', key: 'all' },
  4: { name: '系统发送', key: 'system' }
};
// 消息状态类型
export const MESSAGESTSTUS = {
  1: { name: '已读', key: 'STATUS_READ' },
  2: { name: '未读', key: 'STATUS_UNREAD' },
  3: { name: '删除', key: 'STATUS_DELETE' }
};
// 是否发送手机短信
export const SENDTOPHONE = {
  1: { name: '发送', key: 'YES' },
  2: { name: '不发送', key: 'NO' }
};
// filedsType
export const FIELDSTYPE = {
  1: { name: '小于某个值出发报警', key: 'TYPE_LT' },
  2: { name: '大于某个值', key: 'TYPE_GT' },
  3: { name: '两个值之间', key: 'TYPE_BETWEEN' },
  4: { name: '两个值之外', key: 'TYPE_ANTI_BETWEEN' },
  5: { name: '等于某一个值', key: 'TYPE_EQ' }
};